package com.sinooceangroup.capital.consumer.controller;

import com.sinooceangroup.capital.consumer.service.HystrixService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * TODO..
 *
 * @author: Leo.Wang, adwyxx@qq.com
 * @date: 2020/7/20 18:32
 */
@RestController
public class HystrixController {
    @Autowired
    HystrixService hystrixService;

    @GetMapping("/api/hystrix/{id}")
    public String circuitBreaker(@PathVariable("id") Integer id){
        return hystrixService.circuitBreaker(id);
    }
}
